export default {
  activated () {
    // 为window对象,绑定scroll事件监听
    window.addEventListener('scroll', this.scollHander)
  },
  deactivated () {
    // 为window对象,移除scroll事件监听
    window.removeEventListener('scroll', this.scollHander)
  },
  methods: {
    scollHander () {
      this.$route.meta.top = window.scrollY
    }
  }
}
